package com.example.springboot.common;

import org.springframework.stereotype.Component;

@Component
public class EasyReturn {
    public AjaxResult databaseResult(Integer resultCount) {
        if (resultCount >= 1) return AjaxResult.success("数据库操作成功");
        else return AjaxResult.error("数据库操作失败");
    }

    public String generateReturnStr(Integer integer) {
        if (integer == 1) return "success";
        else return "fail";
    }
}
